<script setup>
import {DFT_ICONS} from "@jzl/icons";

defineProps({
  ext: Object,
  page: Object,
})

const layouts = [
  "prev, next",
  "prev, pager, next",
  "prev, pager, next, total",
  "total, prev, pager, next",
  "prev, pager, next, total",
  "prev, pager, next, jumper",
  "prev, pager, next, jumper, ->, total",
  "total, sizes, prev, pager, next, jumper"
]
</script>

<template>
  <div class="ele-prop-item elem-design-prop-logic" v-if="ext">
    <el-form ref="form" label-position="top" size="mini">
      <el-form-item label="显示属性">
        <el-input
          v-model="ext.label"
          placeholder="默认 label"
        />
      </el-form-item>
      <el-form-item label="值属性">
        <el-input
          v-model="ext.value"
          placeholder="默认 value"
        />
      </el-form-item>
      <el-form-item label="子数据属性">
        <el-input
          v-model="ext.children"
          placeholder="默认 children"
        />
      </el-form-item>

      <el-form-item label="尺寸">
        <el-radio-group v-model="ext.size">
          <el-radio label="">默认</el-radio>
          <el-radio label="small">小</el-radio>
          <el-radio label="large">大</el-radio>
        </el-radio-group>
      </el-form-item>

      <el-form-item label="转换函数（选填）">
        <PageLowcodePicker
          mode="fn"
          v-model:fn="ext.transformFn"
          :page="page"
        />
      </el-form-item>
    </el-form>
  </div>
</template>

<style lang="scss" scoped>
.effect-item {
  //width: 100%;
  line-height: 1.8;
  //height: 40px;
  cursor: pointer;
  border: 2px solid transparent;
  padding: 5px;
  border-radius: 5px;
  font-weight: bold;
  margin: 1px;

  &:hover {
    border-color: var(--j-border-color);
  }
  &.active {
    border-color: var(--j-color-primary);
  }
}
</style>
